﻿using UnityEngine;
using System.Collections;

public class EnemySphere : MonoBehaviour 
{
	public GameObject enemy;
	
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		
	}
	
	void OnTriggerEnter(Collider other)
	{
		if(other.name == "Player")
		{
			enemy.GetComponent<Enemy>().inSphere = true;
		}
	}
	
	void OnTriggerExit(Collider other)
	{
		if(other.name == "Player")
		{
			enemy.GetComponent<Enemy>().inSphere = false;
		}
	}
}
